package com.kamon.Astar{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.utils.getDefinitionByName;
	import flash.events.MouseEvent;
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.display.Loader;
	import flash.net.URLRequest;
	
	public class Weather extends Sprite {
		
		public static const SNOW:String = "effect/snow/snow.swf";
		
		public function Weather(weathername:String) {
			
			var weather_loader:Loader = new Loader();
			weather_loader.contentLoaderInfo.addEventListener(Event.INIT, handleinit)
			weather_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,handleError)
			weather_loader.load(new URLRequest(weathername));
			addChild(weather_loader)
		}
		
		private function handleError(e:IOErrorEvent):void
		{
			
		}
		
		private function handleinit(e:Event):void
		{
			e.currentTarget.content.mouseEnabled = false;
		}
		
	}

}